package com.janwen.spring.datasource.router;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Repository;


@Repository("dbConnection")
public class DSConnection extends GenericDaoImpl {

	static final Log logger = LogFactory.getLog(DSConnection.class);
	static final String sql = "SELECT dskey FROM ds LIMIT 1";
	public void readDB(){
		String dskey = getJdbcTemplate().queryForObject(sql, String.class);
		logger.info(dskey);
		
	}
	
	
	public void writeDB(){
		String dskey = getJdbcTemplate().queryForObject(sql, String.class);
		logger.info(dskey);
	}
	
	
	public void defaultDB(){
		String dskey = getJdbcTemplate().queryForObject(sql, String.class);
		logger.info(dskey);
	}
}
